package com.lingyun.mqttserver.service;

import com.lingyun.mqttserver.dao.pojo.*;
import com.lingyun.mqttserver.vo.*;

public interface ManageDataService {
    Result projectList();

    Result projectAdd(Project project);

    Result projectUpdate(Project project);

    Result projectDelete(Integer id);

    Result deviceTypeList(Integer projectId, String keyword, Integer page, Integer pageSize);

    Result deviceTypeAdd(DeviceType deviceType);

    Result deviceTypeUpdate(DeviceType deviceType);


    Result DeviceAdd(DeviceInfo deviceInfo);

    Result deviceUpdate(DeviceInfo deviceInfo);


    Result DeviceDelete(Integer id);

    Result deviceTypeDelete(Integer deviceTypeId);

    Result dashboardStats();

    Result projectDistribution();

    Result recentData();

    Result deviceTypeByProject(Integer projectId);

    Result DeviceList(Integer projectId, Integer deviceTypeId, String deviceName, Integer pageNum, Integer pageSize);


    Result deviceTypeListAll(Integer projectId);

    Result projectListName();


//    Result realtimeData(Integer projectId, Integer deviceId, Integer limit);

//    Result historyData(Integer variableId, String startTime, String endTime, Integer interval, Integer limit);

    Result dataStats(Integer variableId, String startTime, String endTime);

    Result deviceStatus();


    Result getGroupList(Integer projectId, String groupName);

    Result groupAdd(DeviceGroup deviceGroup);

    Result groupUpdate(DeviceGroup deviceGroup);

    Result groupDelete(Integer id);

    Result groupDeviceList(Integer groupId);

    Result addDeviceToGroup(AddDeviceToGroupVo addDeviceToGroupVo);

    Result removeDeviceFromGroup(Integer groupId, Integer deviceId);

    Result availableDevices(Integer groupId, Integer projectId);

    Result variableList(Integer deviceTypeId);

    Result variableAdd(DeviceTypeVariableTemplateVo deviceTypeVariableTemplate);

    Result variableUpdate(DeviceTypeVariableTemplateVo deviceTypeVariableTemplate);


    Result variableDelete(Integer id);

    Result getMqttScreens(Integer projectId);

    Result getNormalScreens();

    Result getMqttMappings(Integer screenId, Integer groupId);

    Result variablesList(Integer page, Integer size, Integer deviceId, Integer projectId, Integer deviceTypeId);

    Result mappingList(Integer screenId, Integer groupId, Integer projectId);

    Result mappingSave(MqttSaveVo variable);

    Result mappingSaveBatch(MqttBatchSaveVo batchVo);

    Result mappingDelete(Integer id);

    Result boundDevices(Integer screenId);

    Result bindDevice(BindDeviceDTO deviceDTO);

    Result saveDeviceVariable(LowerComputerVariableVo vo);

    Result deleteDeviceVariable(Integer id);

    Result deviceDetail(Integer id);
}
